package com.huluobo.a2206koltindouyin.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.huluobo.a2206koltindouyin.R
import com.huluobo.a2206koltindouyin.utils.ImageUtils
import com.huluobo.base.bean.NewsBean
import com.huluobo.base.mvvm.BaseViewModel

/**
 *  Created by LC on 2024/11/5.
 */
class NewsAdapter : BaseQuickAdapter<NewsBean, BaseViewHolder>(R.layout.item_news) {
    override fun convert(holder: BaseViewHolder, item: NewsBean) {
        ImageUtils.loadImage(context, item.mainimgurl, holder.getView(R.id.item_news_img_iv))
        holder.setText(R.id.item_news_title_tv, item.title)
        holder.setText(R.id.item_news_desc_tv, item.description)
    }
}